package vip.xiaonuo.supplier.modular.custom.custom.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import vip.xiaonuo.common.pojo.CommonEntity;
import vip.xiaonuo.supplier.modular.base.delivery.entity.SupplierDelivery;
import vip.xiaonuo.supplier.modular.base.stores.entity.SupplierStores;
import vip.xiaonuo.supplier.modular.custom.customtag.entity.SupplierCustomTag;
import vip.xiaonuo.supplier.modular.custom.customtype.entity.SupplierCustomType;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 客户信息实体
 *
 * @author Mr.wu
 * @date  2025/03/17 11:20
 **/
@Getter
@Setter
@TableName("SUPPLIER_CUSTOM")
public class SupplierCustom extends CommonEntity {

    /** 客户ID */
    @TableId
    @Schema(description = "客户ID")
    private String id;

    /** 客户名称 */
    @Schema(description = "客户名称")
    private String customName;

    /** 客户类型 */
    @Schema(description = "客户类型")
    @Trans(type = TransType.SIMPLE, target = SupplierCustomType.class, fields = "customTypeName", alias = "customType", ref = "customCustomTypeName")
    private String customCustomType;

     /**客户类型名称 */
    @Schema(description = "客户类型名称")
    @TableField(exist = false)
    private String customCustomTypeName;

    /** 客户电话 */
    @Schema(description = "客户电话")
    private String customTel;

    /** 客户地址 */
    @Schema(description = "客户地址")
    private String customAddress;

    /** 会员手机 */
    @Schema(description = "会员手机")
    private String customMobile;

    /** 负责人 */
    @Schema(description = "负责人")
    private String customPerson;

    /** 所属门店 */
    @Schema(description = "所属门店")
    @Trans(type = TransType.SIMPLE, target = SupplierStores.class, fields = "storeName", alias = "store", ref = "customStoreName")
    private String customStore;

     /**所属门店名称 */
    @Schema(description = "所属门店名称")
    @TableField(exist = false)
    private String customStoreName;

    /** 客户标签 */
    @Schema(description = "客户标签")
    @Trans(type = TransType.SIMPLE, target = SupplierCustomTag.class, fields = "customTag", alias = "customTag", ref = "customTagName")
    private String customTag;

     /**客户标签名称 */
    @Schema(description = "客户标签名称")
    @TableField(exist = false)
    private String customTagName;

    /** 性别 */
    @Schema(description = "性别")
    @Trans(type = TransType.DICTIONARY, key = "GENDER")
    private String customGender;

    /** 生日 */
    @Schema(description = "生日")
    private Date customBirthday;

    /** 客户状态 */
    @Schema(description = "客户状态")
    @Trans(type = TransType.DICTIONARY, key = "COMMON_STATUS")
    private String customStatus;

    /** 联系人 */
    @Schema(description = "联系人")
    private String customContact;

    /** 邮箱 */
    @Schema(description = "邮箱")
    private String customEmail;

    /** 传真 */
    @Schema(description = "传真")
    private String customFax;

    /** 开户行 */
    @Schema(description = "开户行")
    private String customBank;

    /** 银行账户 */
    @Schema(description = "银行账户")
    private String customAccount;

    /** 银行账号 */
    @Schema(description = "银行账号")
    private String customBankcode;

    /** 默认折扣 */
    @Schema(description = "默认折扣")
    private BigDecimal customDiscount;

    /** 客户积分 */
    @Schema(description = "客户积分")
    private Integer customScore;

    /** 累计积分 */
    @Schema(description = "累计积分")
    private Integer customScoreTotal;

    /** 推荐人 */
    @Schema(description = "推荐人")
    @Trans(type = TransType.SIMPLE, target = SupplierCustom.class, fields = "customName", alias = "custom", ref = "customReferenceName")
    private String customReference;

     /**推荐人名称 */
    @Schema(description = "推荐人名称")
    @TableField(exist = false)
    private String customReferenceName;

    /** 允许访问商城 */
    @Schema(description = "允许访问商城")
    @Trans(type = TransType.DICTIONARY, key = "COMMON_SWITCH")
    private String customAllowtovisitmail;

    /** 默认发货方式 */
    @Schema(description = "默认发货方式")
    @Trans(type = TransType.SIMPLE, target = SupplierDelivery.class, fields = "delivery", alias = "delivery", ref = "customDeliveryName")
    private String customDelivery;

     /**默认发货方式名称 */
    @Schema(description = "默认发货方式名称")
    @TableField(exist = false)
    private String customDeliveryName;

    /** 备注 */
    @Schema(description = "备注")
    private String customRemark;

    /** 客户头像 */
    @Schema(description = "客户头像")
    private String customAvatar;

    /** 应收账款 */
    @Schema(description = "应收账款")
    private BigDecimal customAccountsReceivable;

    /** 附件 */
    @Schema(description = "附件")
    private String customAttachment;

    /** 排序码 */
    @Schema(description = "排序码")
    private Integer sortCode;

    /** 扩展信息 */
    @Schema(description = "扩展信息")
    private String extJson;

    /** 数据归属 */
    @Schema(description = "数据归属")
    private String companyId;
}
